home *** CD-ROM | disk | FTP | other *** search
- Path: anvil.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 29 Feb 1996 15:20:12 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4h5cbcINNahr@anvil.ugrad.cs.ubc.ca>
- References: <JSA.96Feb16135027@organon.com> <1996Feb22.005518.13396@leeweyr.sccsi.com> <4gvrffINNlqo@anvil.ugrad.cs.ubc.ca> <4h4j31$1ga3@watnews1.watson.ibm.com>
- NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
-
- In article <4h4j31$1ga3@watnews1.watson.ibm.com>,
- Norman H. Cohen <ncohen@watson.ibm.com> wrote:
-
- >When someone mentions a language "for which no two implementations are in
- >agreement", it is C that springs to mind. Much of the Harbison-Steele
- >book is devoted to explaining the distinctions among K&R C, "traditional"
- >C (which includes extensions made after 1978), and ANSI C. They describe
- >the Bell Labs Portable C Compiler as "a de facto standard for the
- >traditional language." I have heard many C programmers express the
- >opinion that portability of C programs is best insured by writing in K&R
- >C rather than in ANSI C! And then on top of this, we have post-ANSI
-
- That is a poorly stated opinion. What the programmers mean, of course, is that
- if you write in ``K&R'' C (actually ``old style'' C) you ensure that your
- program will be accepted by some old, old compilers. Acceptance by a compiler
- is not to be confused with real portability issues.
-
- Only ANSI guarantees portability.
-
- >dialects such as GNU C and Microsoft C foisted upon us by those who feel
- >they are in a position to impose their own de facto standards. For
-
- So what law is there that prevents the same thing to be done with Ada?
- There is a GNU Ada compiler, too---is _that_ 100% compliant with the standards?
-
- You can't force implementors to obey a standard.
-
- >example, in the description of the -pedantic option in section 2.3 of
- >"Using GNU CC," Stallman writes:
- >
- > A feature to report any failure to conform to ANSI C might be useful
- > in some instances, but would require considerable additional work and
- > would be quite different from '-pedantic'. We recommend, rather,
- > that users take advantage of the extensions of GNU C and disregard
- > the limitations of other compilers. Aside from certain
- > supercomputers and obsolete small machines, thre is less and less
- > reason ever to use any other C compiler other than for bootstrapping
- > GNU CC.
- >
- >The culture in the Ada community is quite different. The need to pass a
-
- The above does not represent the (whole) culture of the community of C users,
- however.
-
- The GNU compiler is not C, and everyone knows that. It just happens to
- translate C programs. It has severely deviant extensions, such as the ability
- to define functions within functions, or to have dynamically-sized automatic
- variables. The above paragraph from ``Using GNU CC'' has ulterior motives. If
- you write freeware code using gratuitous GCC extensions, its use will be
- limited to platforms that are supported by GCC. The user's guide for GCC is not
- a substitute for the C standard by any means, so why quote it here?
- --
-
-